| Total Complexity | 1 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import React from 'react'; |
||
| 4 | |||
| 5 | export class BasicButton extends React.PureComponent { |
||
| 6 | static propTypes = { |
||
| 7 | className: PropTypes.string, |
||
| 8 | func: PropTypes.func, |
||
| 9 | text: PropTypes.string, |
||
| 10 | }; |
||
| 11 | |||
| 12 | static defaultProps = {}; |
||
| 13 | |||
| 14 | render() { |
||
| 15 | const { className, text } = this.props; |
||
| 16 | const { func } = this.props; |
||
| 17 | return ( |
||
| 18 | <button className={className} type="button" onClick={() => func()}> |
||
| 19 | {text} |
||
| 20 | </button> |
||
| 21 | ); |
||
| 35 |